@include('public.page_styles')

  {{--<link rel="stylesheet" href="{{ asset("/AdminLTE/bower_components/morris.js/morris.css") }}">--}}
  {{--<link rel="stylesheet" href="{{ asset("/AdminLTE/bower_components/jvectormap/jquery-jvectormap.css") }}">--}}
  {{--<link rel="stylesheet" href="{{ asset("/AdminLTE/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css") }}">--}}
  {{--<link rel="stylesheet" href="{{ asset("/AdminLTE/bower_components/bootstrap-daterangepicker/daterangepicker.css") }}">--}}
  <link rel="stylesheet" href="{{ asset("/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css") }}">
  <link rel="stylesheet" href="{{ asset("/css/home_style.css") }}">
<style>
  .table{
    color: #fff;
  }
  #TtitleStyle{
    /*background-color: ##8da8ca;  */
    background-color: #718e9c;
  }
  #TcontentStyle{
    background-color: #fff;
  }
  form{
    color: #fff;
  }
</style>

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

@include('public.top')
  <!-- Left side column. contains the logo and sidebar -->
@include('public.sidebar')

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        主页
        <small>控制面板</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li class="active">主页</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <!-- Small boxes (Stat box) -->

      <div class="row">
        <section class="col-lg-6 connectedSortable">
          <!-- Custom tabs (Charts with tabs)-->
          <div class="box" style="background: #718e9c;margin-bottom:0">
            <div class="box-header" style="margin-left: 40px;padding: 22px;">
              <form class="form_search" action="{{ url('home') }}" method="GET" style="margin-bottom:10px">
                <div style="float:left;margin-right:5px">
                  <label>网点</label>
                  <select class="form-control" name="shopS">
                    <option value=""  class="input-xlarge option" >全部</option>
                    @if($bankShop)
                      @foreach($bankShop as $shop)
                        <option value="{{ $shop->id }}" @if($shopS == $shop->id ) selected @endif>{{ $shop->shopName }}</option>
                      @endforeach
                    @endif
                  </select>
                </div>
                <div style="float:left;margin-right:5px">
                  <label>设备编号</label>
                  <select class="form-control" name="e_codeS">
                    <option value=""  class="input-xlarge option" >全部</option>
                    @if($bankShopEquipment)
                      @foreach($bankShopEquipment as $ep)
                        <option value="{{ $ep->e_code }}" @if($e_codeS == $ep->e_code ) selected @endif>{{ $ep->e_code }}</option>
                      @endforeach
                    @endif
                  </select>
                  {{--<input type="text" name="e_codeS"  class="form-control input" placeholder="设备编号" value="{{ $e_codeS }}">--}}
                </div>
                <div class="btn-toolbar" style="padding-top:20px;padding-bottom:0px;margin-bottom:0px">
                  <button type="submit" class="btn btn-primary">检索</button>
                </div>
              </form>
            </div>

            <!-- /.box-header -->
            <div class="box-body" style="margin-left: 40px;margin-right: 40px;padding-bottom: 23px;">
              <table id="example1" class="table table-bordered table-striped">
                <tr id="TtitleStyle">
                  <th>下单成功数</th>
                  <th>收益总额</th>
                </tr>
                <tr >
                  <td>{{ $order_xd->xdTotal }}</td>
                  <td>{{ isset($order_xd->xdMoney) ? $order_xd->xdMoney : 0 }}</td>
                </tr>
              </table>
              <p style="padding-bottom: 25px;"></p>
              <table id="example1" class="table table-bordered table-striped">
                <tr id="TtitleStyle">
                  <th>退单总数</th>
                  <th>退款总额</th>
                </tr>
                <tr >
                  <td>{{ $order_th->thTotal }}</td>
                  <td>{{ isset($order_th->thMoney) ? $order_th->thMoney : 0  }}</td>
                </tr>
              </table>
            </div>
          </div>
          <!-- /.nav-tabs-custom -->
        </section>

        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-aqua">
            <div class="inner">
              <h3>{{ $orderTotal }}<sup style="font-size: 20px">个</sup></h3>
              <p>总订单数</p>
              <ul style="list-style-type: none">
                <li><label>待支付：</label>{{ $orderPendingPayment }}个</li>
                <li><label>已取消：</label>{{ $orderClosed }}个</li>
                <li><label>待使用：</label>{{ $orderPendingUse }}个</li>
                <li><label>使用中：</label>{{ $orderUseIn }}个</li>
                <li><label>已完成：</label>{{ $orderCompleted }}个</li>
                <li><label>退款中：</label>{{ $orderRefund }}个</li>
                <li><label>已退款：</label>{{ $orderRefunded }}个</li>
              </ul>
            </div>
            <div class="icon">
              <i class="fa fa-reorder"></i>
            </div>
            <div class="small-box-footer" style="height: 26px;">
              @if(in_array(menuIdToUrl('order/list'),menu_permission(Auth::user()->id)))
                <a href="{{ url('order/list') }}" style="color: #fff">查看订单管理<i class="fa fa-arrow-circle-right"></i></a>
              @endif
            </div>
          </div>
        </div>
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-yellow">
            <div class="inner">
              <h3>{{ $userCouponTotal }}<sup style="font-size: 20px">个</sup></h3>
              <p>优惠券领取总数</p>
              <ul style="list-style-type: none">
                <li><label>未使用：</label>{{ $userUseTotal }}个</li>
                <li><label>已使用：</label>{{ $userNoUseTotal }}个</li>
                <li><label>已过期：</label>{{ $userExpiredTotal }}个</li>
                <li><label></label></li>
                <li><label></label></li>
                <li><label></label></li>
                <li><label></label></li>
                <li><label></label></li>
              </ul>
            </div>
            <div class="icon">
              <i class="fa fa-money"></i>
            </div>
            <div class="small-box-footer" style="height: 26px;">
              @if(in_array(menuIdToUrl('coupon/statistics/userAccount'),menu_permission(Auth::user()->id)))
                <a href="{{ url('coupon/statistics/userAccount') }}" style="color: #fff">查看优惠券数据<i class="fa fa-arrow-circle-right"></i></a>
              @endif
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-red">
            <div class="inner">
              <h3>{{ $moneyTotal }}<sup style="font-size: 20px">¥</sup></h3>
              <p>总收入金额</p>
            </div>
            <div class="icon">
              {{--<i class="fa fa-money"></i>--}}
              <i class="fa fa-yen"></i>
            </div>
            <div class="small-box-footer" style="height: 26px;">
              @if(in_array(menuIdToUrl('order/order_money/chart'),menu_permission(Auth::user()->id)))
                <a href="{{ url('order/order_money/chart') }}" style="color: #fff">查看财务数据 <i class="fa fa-arrow-circle-right"></i></a>
              @endif
            </div>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6" @if($style_display) style="display: none" @endif>
          <!-- small box -->
          <div class="small-box bg-green">
            <div class="inner">
              <h3>{{ $userAccountTotal }}<sup style="font-size: 20px">个</sup></h3>
              <p>微信用户总数</p>
            </div>
            <div class="icon">
              <i class="ion ion-ios-people-outline"></i>
            </div>
            <div class="small-box-footer" style="height: 26px;">
              @if(in_array(menuIdToUrl('userAccount/list'),menu_permission(Auth::user()->id)))
                <a href="{{ url('userAccount/list') }}" style="color: #fff" >查看用户管理 <i class="fa fa-arrow-circle-right"></i></a>
              @endif
            </div>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6" @if($style_display) style="display: none" @endif>
          <!-- small box   bg-maroon -->
          <div class="small-box bg-light-blue">
            <div class="inner">
              <h3>{{ $bankShopTotal }}<sup style="font-size: 20px">个</sup></h3>
              <p>网点总数</p>
            </div>
            <div class="icon">
              <i class="fa fa-bank"></i>
            </div>
            <div class="small-box-footer" style="height: 26px;">
              @if(in_array(menuIdToUrl('bankShop/list'),menu_permission(Auth::user()->id)))
                <a href="{{ url('bankShop/list') }}" style="color: #fff">查看网点管理 <i class="fa fa-arrow-circle-right"></i></a>
              @endif
            </div>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box   bg-olive-->
          <div class="small-box bg-purple">
            <div class="inner">
              <h3>{{ $bankShopEquipmentTotal }}<sup style="font-size: 20px">个</sup></h3>
              <p>设备总数</p>
            </div>
            <div class="icon">
              <i class="fa fa-cube"></i>
            </div>
            <div class="small-box-footer" style="height: 26px;">
              @if(in_array(menuIdToUrl('equipment/list'),menu_permission(Auth::user()->id)))
                <a href="{{ url('equipment/list') }}" style="color: #fff">查看设备管理 <i class="fa fa-arrow-circle-right"></i></a>
              @endif
            </div>
          </div>
        </div>

      </div>
      <div class="row">
      </div>

      <!-- /.row -->
      <!-- Main row -->
      <!-- /.row (main row) -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
@include('public.bottom')

  <!-- Control Sidebar -->
{{--@include('public.aside')--}}
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

@include('public.javascript')
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>

{{--<script src="{{ asset ("/AdminLTE/bower_components/raphael/raphael.min.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/bower_components/bower_components/morris.js/morris.min.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/bower_components/jquery-sparkline/dist/jquery.sparkline.min.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/plugins/jvectormap/jquery-jvectormap-world-mill-en.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/bower_components/jquery-knob/dist/jquery.knob.min.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/bower_components/moment/min/moment.min.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/bower_components/bootstrap-daterangepicker/daterangepicker.js") }}"></script>--}}
{{--<script src="{{ asset ("/AdminLTE/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js") }}"></script>--}}
<script src="{{ asset ("/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js") }}"></script>
<script src="{{ asset ("/AdminLTE/bower_components/jquery-slimscroll/jquery.slimscroll.min.js") }}"></script>
{{--<script src="{{ asset ("/AdminLTE/dist/js/pages/dashboard.js") }}"></script>--}}
<!-- AdminLTE for demo purposes -->

</body>
</html>
